package com.medusa.aps.business.modules.basic.mp.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.medusa.aps.business.modules.basic.model.input.WorkingCalendarPageParam;
import com.medusa.aps.business.modules.basic.model.output.CalendarModel;
import com.medusa.aps.business.modules.basic.model.output.CalendarWithHeaderModel;
import com.medusa.aps.business.modules.basic.mp.entity.WorkingCalendar;

import java.time.LocalDate;
import java.util.List;
import java.util.concurrent.ExecutionException;

/**
 * 工作日历服务接口
 *
 * @author yuxh
 * @since 2023-08-14 17:37:53
 */
public interface WorkingCalendarService extends IService<WorkingCalendar> {

    /**
     * 分页查询工作日历数据 返回带表头的数据
     *
     * @param query 分页查询参数
     * @return 查询结果
     */
    CalendarWithHeaderModel calendarPage(WorkingCalendarPageParam query);

    /**
     * 编辑工作日历
     *
     * @param calendarModel 编辑工作日历参数
     */
    void updateCalendar(CalendarModel calendarModel);

    void generateWorkingCalendar();

    void saveWorkingCalendars(List<WorkingCalendar> workingCalendars) throws ExecutionException, InterruptedException;

    /**
     * 根据指定时间与班制id删除工作日历
     *
     * @param classId 班制id
     * @param localDate 删除的时间
     */
    void delCalendarByLimit(Integer classId, LocalDate localDate);
}

